package org.iteam.core.view;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * easyui tree 的节点实体
 * 
 * @author wenke
 * 
 */
public class TreeNode implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -2754242574729622327L;
	/**
	 * 
	 */
	private String state;

	private String id;
	private String text;
	private TreeNodeAttribute attributes;
	private long count;
	private String parentid;
	private List<TreeNode> children = new ArrayList<TreeNode>();
	private int sort;
	public int getSort() {
		return sort;
	}

	public void setSort(int sort) {
		this.sort = sort;
	}

	public TreeNode() {
		super();
		// TODO Auto-generated constructor stub
	}

	public TreeNode(String id, String text, String url, List<TreeNode> children) {
		super();
		this.id = id;
		this.text = text;
		this.attributes = new TreeNodeAttribute(url);
		this.children = children;
	}

	public TreeNode(String id, String text, String url) {
		super();
		this.id = id;
		this.text = text;
		this.attributes = new TreeNodeAttribute(url);
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public long getCount() {
		return count;
	}

	public void setCount(long count) {
		this.count = count;
	}

	public TreeNodeAttribute getAttributes() {
		return attributes;
	}

	public void setAttributes(TreeNodeAttribute attributes) {
		this.attributes = attributes;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public List<TreeNode> getChildren() {
		return children;
	}

	public void setChildren(List<TreeNode> children) {
		this.children = children;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public String getParentid() {
		return parentid;
	}

	public void setParentid(String parentid) {
		this.parentid = parentid;
	}
}
